package edu.ccut.saturn.component;

public class SaturnResponse {
	
	private boolean response;
	
	private String url;

	private SaturnResponse() {
	
	}
	
	
	public static SaturnResponse sendRedirect(){
		SaturnResponse saturnResponse = new SaturnResponse();	
		saturnResponse.setResponse(true);	
		return saturnResponse;
	}
	
	
	public static SaturnResponse sendRedirect(String errorUrl){
		
		SaturnResponse saturnResponse = new SaturnResponse();	
		saturnResponse.setResponse(false);	
		saturnResponse.setUrl(errorUrl);
		return saturnResponse;
	}

	public boolean isResponse() {
		return response;
	}

	public String getUrl() {
		return url;
	}


	private void setResponse(boolean response) {
		this.response = response;
	}


	private void setUrl(String url) {
		this.url = url;
	}
	
	
}
